#pragma once

#include "stdafx.h"
#include "afxwin.h"
#include "resource.h"
#include "atlimage.h"

#include <list>

typedef std::list<double> LISTDOUBLE;


class PicOpts
{
public:
	PicOpts();
	~PicOpts();

	virtual void drawPics(CDC* pDC) {};
	virtual void setParam(double param) { params.push_back(param); }
	virtual void setParams(LISTDOUBLE ps) { params.merge(ps); }
	virtual void setSrcBitMapID(int id) { picID = id; }
	virtual void cbitMapToImage(CImage *image, CBitmap *bitmap);
	virtual void imageToCbitMap(CBitmap *bitmap, CImage *image);
	virtual void CopyBitmap(CBitmap *src, CBitmap *dest);
	virtual void clearRect(CDC* pDC, int width, int height);

protected:
	virtual void resetBitMap() {
		if (picID != NULL) {
			srcBitMap.LoadBitmapW(picID);
			destBitMap.LoadBitmapW(picID);
		}
	};

	CBitmap srcBitMap;
	CBitmap destBitMap;

	LISTDOUBLE params;
	int picID = IDB_DEFAULT;
};

